package com.aifast.system.log.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author fujian
 * @since 2022-01-20
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("log_operation")
public class LogOperation {

    private static final long serialVersionUID = 1L;
    public final static String KEY = "ai:mq:log:operation";

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 用户真实姓名
     */
    private String realName;

    /**
     * 项目标识
     */
    private String tenant;

    /**
     * 表名
     */
    private String tableName;

    /**
     * 表数据id
     */
    private String tableId;

    /**
     * 操作标识
     */
    private String sign;

    /**
     * 操作描述
     */
    private String description;

    /**
     * 数据详情
     */
    private String detail;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;


}
